<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<form:form modelAttribute="page" id="pagerForm" method="post"
           action="${ctx}/authority/list?navtabid=permissionNav">
    <input type="hidden" name="pageNo" value="1" />
    <input type="hidden" id="pageSize" name="pageSize" value="${page.pageSize}" />
    <input type="hidden" name="orderBy" value="${page.orderBy}" />
    <input type="hidden" name="order" value="${page.order}" />
</form:form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="${ctx}/authority/list?navtabid=permissionNav"
          method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>用户名：<input type="text" name="name" value=""/>
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" target="dialog" href="${ctx}/authority/add?navtabid=permissionNav" target="navTab"><span>添加</span></a>
            </li>
            <li class="line">line</li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="138">
        <thead>
        <tr>
            <th width="40"><input type="checkbox" class="checkboxCtrl"
                                  group="c1"/></th>
            <th orderField="name"
                class=" ${page.orderBy eq 'name' ? page.order : '' }">name
            </th>
            <th>permission</th>
            <th orderField="modulename"
                class=" ${page.orderBy eq 'modulename' ? page.order : '' }">modulename
            </th>
            <th orderField="module"
                class=" ${page.orderBy eq 'module' ? page.order : '' }">module
            </th>
            <th orderField="action"
                class=" ${page.orderBy eq 'action' ? page.order : '' }">action
            </th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="item" items="${page.result}" varStatus="menu">
            <tr>
                <td><input type="checkbox" name="c1" value=""/></td>
                <td><c:out value='${item.name}'/></td>
                <td><c:out value='${item.permission}'/></td>
                <td><c:out value='${item.modulename}'/></td>
                <td><c:out value='${item.module}'/></td>
                <td><c:out value='${item.action}'/></td>
                <td>
                    <a class="btnDel" href="${ctx}/authority/delete/${item.id}"
                       target="ajaxTodo" title="确定要删除吗?">删除</a>
                    <a class="btnEdit" href="${ctx}/authority/edit/${item.id}?navtabid=permissionNav"
                       target="dialog" title="修改">修改</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <%@ include file="/commons/panelBar.jsp" %>
</div>
